﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using ERP_RORZE_SYSTEM;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace ERP_RORZE_DLL.Business
{
    public partial class BusinessPanel : UserControl
    {

        private bool importquotationLoad;
        private bool exportquotationLoad;
        private bool robotquotationLoad;
        private bool partquotationLoad;
        private bool clearanceLoad;
        private bool clearanceorderLoad;
        private bool masterpoLoad;
        private bool masterpodetailsLoad;
        private bool poLoad;
        private bool podetailsLoad;
        private bool partreceiveLoad;        
        private bool partmistakestatusLoad;
        private bool remainstoreestimateLoad;
        private bool exportplanLoad;        
        private bool iqlasttimeremainLoad;
        private bool rzcodeLoad;
        private bool rzconsumptionLoad;
        private bool consumptioncheckLoad;
        private bool iqrealtimeLoad;
        private bool freezaikoLoad;
        private bool masterplanLoad;
        private bool yoyakuLoad;

        //private bool testLoad;

        private bool mainreportLoad;
        private bool masterporeportLoad;
        private bool pocoverreportLoad;
        private bool arrivinggoodsLoad;
        private bool orderinvoiceLoad;

        private panel_ImportQuotation panel_ImportQuotation;
        private panel_ExportQuotation panel_ExportQuotation;
        private panel_RobotQuotation panel_RobotQuotation;
        private panel_PartQuotation panel_PartQuotation;
        private panel_Clearance panel_Clearance;
        private panel_ImportOrderClearance panel_ImportOrderClearance;
        private panel_MasterPO panel_MasterPO;
        private panel_MasterPODetails panel_MasterPODetails;
        private panel_PurchaseOrder panel_PurchaseOrder;
        private panel_PartReceive panel_PartReceive;        
        private panel_PartMistakeStatus panel_PartMistakeStatus;
        private panel_RemainStoreEstimate panel_RemainStoreEstimate;
        private panel_PODetails panel_PODetails;
        private panel_ExportPlan panel_ExportPlan;        
        private panel_IQLastTimeRemain panel_IQLastTimeRemain;
        private panel_RZCode panel_RZCode;
        private panel_RZConsumption panel_RZConsumption;
        private panel_ConsumptionCheck panel_ConsumptionCheck;
        private panel_IQRealTime panel_IQRealTime;
        private panel_FreeZaiko panel_FreeZaiko;
        private panel_MasterPlan panel_MasterPlan;
        private panel_Yoyaku panel_Yoyaku;        

        private panel_MainReport panel_MainReport;
        private panel_ReportPOCover panel_ReportPOCover;
        private panel_ReportMasterPOCover panel_ReportMasterPOCover;
        private panel_ImportOrder panel_ImportOrder;
        private panel_OrderInvoice panel_OrderInvoice;

        public BusinessPanel()
        {
            InitializeComponent();
            this.importquotationLoad = false;
            this.exportquotationLoad = false;
            this.robotquotationLoad = false;
            this.partquotationLoad = false;
            this.clearanceLoad = false;
            this.clearanceorderLoad = false;
            this.mainreportLoad = false;
            this.masterpoLoad = false;
            this.masterpodetailsLoad = false;
            this.poLoad = false;
            this.podetailsLoad = false;
            this.partreceiveLoad = false;
            this.partmistakestatusLoad = false;
            this.exportplanLoad = false;            
            this.remainstoreestimateLoad = false;
            this.iqlasttimeremainLoad = false;
            this.rzcodeLoad = false;
            this.rzconsumptionLoad = false;
            this.consumptioncheckLoad = false;
            this.iqrealtimeLoad = false;
            this.freezaikoLoad = false;
            this.masterplanLoad = false;
            this.yoyakuLoad = false;            

            //this.testLoad = false;

            this.mainreportLoad = false;
            this.pocoverreportLoad = false;
            this.masterporeportLoad = false;
            this.arrivinggoodsLoad = false;
            this.orderinvoiceLoad = false;
        }


        void businessLeftPanel_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            switch (e.Link.Item.Name)
            {
                case "navImportQuotation": 
                    // 
                    // panel_ImportQuotation
                    // 
                    if (!importquotationLoad)
                    {
                        this.panel_ImportQuotation = new ERP_RORZE_DLL.Business.panel_ImportQuotation();
                        importquotationLoad = true;
                    }
                    else
                    {
                        this.panel_ImportQuotation.Dispose();
                        this.panel_ImportQuotation = new ERP_RORZE_DLL.Business.panel_ImportQuotation();
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_ImportQuotation);
                    this.panel_ImportQuotation.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_ImportQuotation.Location = new System.Drawing.Point(2, 2);
                    this.panel_ImportQuotation.Name = "panel_ImportQuotation";
                    this.panel_ImportQuotation.Size = new System.Drawing.Size(697, 425);
                    this.panel_ImportQuotation.TabIndex = 0; 
                    break;

                case "navExportQuotation":
                    // 
                    // panel_ExportQuotation
                    // 
                    if (!exportquotationLoad)
                    {
                        this.panel_ExportQuotation = new ERP_RORZE_DLL.Business.panel_ExportQuotation();
                        exportquotationLoad = true;
                    }
                    else
                    {
                        this.panel_ExportQuotation.Dispose();
                        this.panel_ExportQuotation = new ERP_RORZE_DLL.Business.panel_ExportQuotation();
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_ExportQuotation);
                    this.panel_ExportQuotation.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_ExportQuotation.Location = new System.Drawing.Point(2, 2);
                    this.panel_ExportQuotation.Name = "panel_ExportQuotation";
                    this.panel_ExportQuotation.Size = new System.Drawing.Size(697, 425);
                    this.panel_ExportQuotation.TabIndex = 0;
                    break;

                case "navRobotQuotation": 
                    // 
                    // panel_RobotQuotation
                    // 
                    if (!robotquotationLoad)
                    {
                        this.panel_RobotQuotation = new ERP_RORZE_DLL.Business.panel_RobotQuotation();
                        robotquotationLoad = true;
                    }
                    else
                    {
                        this.panel_RobotQuotation.Dispose();
                        this.panel_RobotQuotation = new ERP_RORZE_DLL.Business.panel_RobotQuotation();
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_RobotQuotation);
                    this.panel_RobotQuotation.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_RobotQuotation.Location = new System.Drawing.Point(2, 2);
                    this.panel_RobotQuotation.Name = "panel_RobotQuotation";
                    this.panel_RobotQuotation.Size = new System.Drawing.Size(697, 425);
                    this.panel_RobotQuotation.TabIndex = 0; 
                    break;

                case "navPartQuotation": 
                    // 
                    // panel_PartQuotation
                    // 
                    if (!partquotationLoad)
                    {
                        this.panel_PartQuotation = new ERP_RORZE_DLL.Business.panel_PartQuotation();
                        partquotationLoad = true;
                    }
                    else
                    {
                        this.panel_PartQuotation.Dispose();
                        this.panel_PartQuotation = new ERP_RORZE_DLL.Business.panel_PartQuotation();
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_PartQuotation);
                    this.panel_PartQuotation.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_PartQuotation.Location = new System.Drawing.Point(2, 2);
                    this.panel_PartQuotation.Name = "panel_PartQuotation";
                    this.panel_PartQuotation.Size = new System.Drawing.Size(697, 425);
                    this.panel_PartQuotation.TabIndex = 0; 
                    break;

                case "navClearance":
                    // 
                    // panel_Clearance
                    // 
                    if (!clearanceLoad)
                    {
                        this.panel_Clearance = new ERP_RORZE_DLL.Business.panel_Clearance();
                        clearanceLoad = true;
                    }
                    else
                    {
                        this.panel_Clearance.Dispose();
                        this.panel_Clearance = new ERP_RORZE_DLL.Business.panel_Clearance();
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_Clearance);
                    this.panel_Clearance.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_Clearance.Location = new System.Drawing.Point(2, 2);
                    this.panel_Clearance.Name = "panel_Clearance";
                    this.panel_Clearance.Size = new System.Drawing.Size(697, 425);
                    this.panel_Clearance.TabIndex = 0;
                    break;

                case "navOrderClearance":
                    // 
                    // panel_ImportOrderClearance
                    // 
                    if (!clearanceorderLoad)
                    {
                        this.panel_ImportOrderClearance = new ERP_RORZE_DLL.Business.panel_ImportOrderClearance();
                        clearanceorderLoad = true;
                    }
                    else
                    {
                        this.panel_ImportOrderClearance.Dispose();
                        this.panel_ImportOrderClearance = new ERP_RORZE_DLL.Business.panel_ImportOrderClearance();
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_ImportOrderClearance);
                    this.panel_ImportOrderClearance.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_ImportOrderClearance.Location = new System.Drawing.Point(2, 2);
                    this.panel_ImportOrderClearance.Name = "panel_ImportOrderClearance";
                    this.panel_ImportOrderClearance.Size = new System.Drawing.Size(697, 425);
                    this.panel_ImportOrderClearance.TabIndex = 0;
                    break;

                case "navMasterPO":
                    // 
                    // panel_MasterPO
                    // 
                    if (!masterpoLoad)
                    {
                        this.panel_MasterPO = new ERP_RORZE_DLL.Business.panel_MasterPO();
                        masterpoLoad = true;
                    }
                    else
                    {
                        this.panel_MasterPO.Dispose();
                        this.panel_MasterPO = new ERP_RORZE_DLL.Business.panel_MasterPO();
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_MasterPO);
                    this.panel_MasterPO.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_MasterPO.Location = new System.Drawing.Point(2, 2);
                    this.panel_MasterPO.Name = "panel_MasterPO";
                    this.panel_MasterPO.Size = new System.Drawing.Size(697, 425);
                    this.panel_MasterPO.TabIndex = 0;
                    break;

                case "navMasterPODetails":
                    // 
                    // panel_MasterPODetails
                    // 
                    if (!masterpodetailsLoad)
                    {
                        this.panel_MasterPODetails = new ERP_RORZE_DLL.Business.panel_MasterPODetails();
                        masterpodetailsLoad = true;
                    }
                    else
                    {
                        this.panel_MasterPODetails.Dispose();
                        this.panel_MasterPODetails = new ERP_RORZE_DLL.Business.panel_MasterPODetails();
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_MasterPODetails);
                    this.panel_MasterPODetails.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_MasterPODetails.Location = new System.Drawing.Point(2, 2);
                    this.panel_MasterPODetails.Name = "panel_MasterPODetails";
                    this.panel_MasterPODetails.Size = new System.Drawing.Size(697, 425);
                    this.panel_MasterPODetails.TabIndex = 0;
                    break;

                case "navPurchaseOrder":
                    // 
                    // panel_PurchaseOrder
                    // 
                    if (!poLoad)
                    {
                        this.panel_PurchaseOrder = new ERP_RORZE_DLL.Business.panel_PurchaseOrder();
                        poLoad = true;
                    }
                    else
                    {
                        this.panel_PurchaseOrder.Dispose();
                        this.panel_PurchaseOrder = new ERP_RORZE_DLL.Business.panel_PurchaseOrder();
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_PurchaseOrder);
                    this.panel_PurchaseOrder.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_PurchaseOrder.Location = new System.Drawing.Point(2, 2);
                    this.panel_PurchaseOrder.Name = "panel_PurchaseOrder";
                    this.panel_PurchaseOrder.Size = new System.Drawing.Size(697, 425);
                    this.panel_PurchaseOrder.TabIndex = 0;
                    break;

                case "navPurchaseInfomation":
                    // 
                    // panel_PODetails
                    // 
                    if (!podetailsLoad)
                    {
                        this.panel_PODetails = new ERP_RORZE_DLL.Business.panel_PODetails();
                        podetailsLoad = true;
                    }
                    else
                    {
                        this.panel_PODetails.Dispose();
                        this.panel_PODetails = new ERP_RORZE_DLL.Business.panel_PODetails();
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_PODetails);
                    this.panel_PODetails.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_PODetails.Location = new System.Drawing.Point(2, 2);
                    this.panel_PODetails.Name = "panel_PODetails";
                    this.panel_PODetails.Size = new System.Drawing.Size(697, 425);
                    this.panel_PODetails.TabIndex = 0;
                    break;

                case "navPartReceive":
                    // 
                    // panel_PartReceive
                    //
                    if (!partreceiveLoad)
                    {
                        this.panel_PartReceive = new ERP_RORZE_DLL.Business.panel_PartReceive();
                        partreceiveLoad = true;
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_PartReceive);
                    this.panel_PartReceive.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_PartReceive.Location = new System.Drawing.Point(2, 2);
                    this.panel_PartReceive.Name = "panel_PartReceive";
                    this.panel_PartReceive.Size = new System.Drawing.Size(697, 425);
                    this.panel_PartReceive.TabIndex = 0;
                    break;

                case "navPartMistake":
                    // 
                    // panel_PartMistake
                    // 
                    if (!partmistakestatusLoad)
                    {
                        this.panel_PartMistakeStatus = new ERP_RORZE_DLL.Business.panel_PartMistakeStatus();
                        partmistakestatusLoad = true;
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_PartMistakeStatus);
                    this.panel_PartMistakeStatus.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_PartMistakeStatus.Location = new System.Drawing.Point(2, 2);
                    this.panel_PartMistakeStatus.Name = "panel_PartMistakeStatus";
                    this.panel_PartMistakeStatus.Size = new System.Drawing.Size(697, 425);
                    this.panel_PartMistakeStatus.TabIndex = 0;
                    break;
                case "navStoreInputEstimate":
                    // 
                    // panel_RemainStoreEstimate
                    //
                    if (!remainstoreestimateLoad)
                    {
                        this.panel_RemainStoreEstimate = new ERP_RORZE_DLL.Business.panel_RemainStoreEstimate();
                        remainstoreestimateLoad = true;
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_RemainStoreEstimate);
                    this.panel_RemainStoreEstimate.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_RemainStoreEstimate.Location = new System.Drawing.Point(2, 2);
                    this.panel_RemainStoreEstimate.Name = "panel_RemainStoreEstimate";
                    this.panel_RemainStoreEstimate.Size = new System.Drawing.Size(697, 425);
                    this.panel_RemainStoreEstimate.TabIndex = 0;
                    break;

                case "navOrderInvoice":
                    // 
                    // panel_OrderInvoice
                    //
                    if (!orderinvoiceLoad)
                    {
                        this.panel_OrderInvoice = new ERP_RORZE_DLL.Business.panel_OrderInvoice();
                        orderinvoiceLoad = true;
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_OrderInvoice);
                    this.panel_OrderInvoice.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_OrderInvoice.Location = new System.Drawing.Point(2, 2);
                    this.panel_OrderInvoice.Name = "panel_OrderInvoice";
                    this.panel_OrderInvoice.Size = new System.Drawing.Size(697, 425);
                    this.panel_OrderInvoice.TabIndex = 0;
                    break;

                case "navExportPlan":
                    // 
                    // panel_ExportPlan
                    //
                    if (!exportplanLoad)
                    {
                        this.panel_ExportPlan = new ERP_RORZE_DLL.Business.panel_ExportPlan();
                        exportplanLoad = true;
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_ExportPlan);
                    this.panel_ExportPlan.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_ExportPlan.Location = new System.Drawing.Point(2, 2);
                    this.panel_ExportPlan.Name = "panel_ExportPlan";
                    this.panel_ExportPlan.Size = new System.Drawing.Size(697, 425);
                    this.panel_ExportPlan.TabIndex = 0;
                    break;

                case "navIQLastRemain":
                    // 
                    // panel_IQLastTimeRemain
                    //
                    if (!iqlasttimeremainLoad)
                    {
                        this.panel_IQLastTimeRemain = new ERP_RORZE_DLL.Business.panel_IQLastTimeRemain();
                        iqlasttimeremainLoad = true;
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_IQLastTimeRemain);
                    this.panel_IQLastTimeRemain.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_IQLastTimeRemain.Location = new System.Drawing.Point(2, 2);
                    this.panel_IQLastTimeRemain.Name = "panel_IQLastTimeRemain";
                    this.panel_IQLastTimeRemain.Size = new System.Drawing.Size(697, 425);
                    this.panel_IQLastTimeRemain.TabIndex = 0;
                    break;

                case "navRZCode":
                    // 
                    // panel_RZCode
                    //                    
                    if (!rzcodeLoad)
                    {
                        this.panel_RZCode = new ERP_RORZE_DLL.Business.panel_RZCode();
                        rzcodeLoad = true;
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_RZCode);
                    this.panel_RZCode.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_RZCode.Location = new System.Drawing.Point(2, 2);
                    this.panel_RZCode.Name = "panel_RZCode";
                    this.panel_RZCode.Size = new System.Drawing.Size(697, 425);
                    this.panel_RZCode.TabIndex = 0;
                    break;

                case "navRZConsumption":
                    // 
                    // panel_RZConsumption
                    //
                    if (!rzconsumptionLoad)
                    {
                        this.panel_RZConsumption = new ERP_RORZE_DLL.Business.panel_RZConsumption();
                        rzconsumptionLoad = true;
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_RZConsumption);
                    this.panel_RZConsumption.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_RZConsumption.Location = new System.Drawing.Point(2, 2);
                    this.panel_RZConsumption.Name = "panel_RZConsumption";
                    this.panel_RZConsumption.Size = new System.Drawing.Size(697, 425);
                    this.panel_RZConsumption.TabIndex = 0;
                    break;
                case "navConsumptionExCheck":
                    // 
                    // panel_ConsumptionCheck
                    //
                    if (!consumptioncheckLoad)
                    {
                        this.panel_ConsumptionCheck = new ERP_RORZE_DLL.Business.panel_ConsumptionCheck();
                        consumptioncheckLoad = true;
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_ConsumptionCheck);
                    this.panel_ConsumptionCheck.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_ConsumptionCheck.Location = new System.Drawing.Point(2, 2);
                    this.panel_ConsumptionCheck.Name = "panel_RZConsumption";
                    this.panel_ConsumptionCheck.Size = new System.Drawing.Size(697, 425);
                    this.panel_ConsumptionCheck.TabIndex = 0;
                    break;

                case "navIQRealTime":
                    // 
                    // panel_IQTest
                    //
                    if (!iqrealtimeLoad)
                    {
                        this.panel_IQRealTime = new ERP_RORZE_DLL.Business.panel_IQRealTime();
                        iqrealtimeLoad = true;
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_IQRealTime);
                    this.panel_IQRealTime.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_IQRealTime.Location = new System.Drawing.Point(2, 2);
                    this.panel_IQRealTime.Name = "panel_IQRealTime";
                    this.panel_IQRealTime.Size = new System.Drawing.Size(697, 425);
                    this.panel_IQRealTime.TabIndex = 0;
                    break;

                case "navFreeZaiko":
                    // 
                    // panel_FreeZaiko
                    //
                    if (!freezaikoLoad)
                    {
                        this.panel_FreeZaiko = new ERP_RORZE_DLL.Business.panel_FreeZaiko();
                        freezaikoLoad = true;
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_FreeZaiko);
                    this.panel_FreeZaiko.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_FreeZaiko.Location = new System.Drawing.Point(2, 2);
                    this.panel_FreeZaiko.Name = "panel_FreeZaiko";
                    this.panel_FreeZaiko.Size = new System.Drawing.Size(697, 425);
                    this.panel_FreeZaiko.TabIndex = 0;
                    break;
                case "navMasterPlan":
                    // 
                    // panel_MasterPlan
                    //
                    if (!masterplanLoad)
                    {
                        this.panel_MasterPlan = new ERP_RORZE_DLL.Business.panel_MasterPlan();
                        masterplanLoad = true;
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_MasterPlan);
                    this.panel_MasterPlan.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_MasterPlan.Location = new System.Drawing.Point(2, 2);
                    this.panel_MasterPlan.Name = "panel_MasterPlan";
                    this.panel_MasterPlan.Size = new System.Drawing.Size(697, 425);
                    this.panel_MasterPlan.TabIndex = 0;
                    break;
                case "navYoyaku":
                    // 
                    // panel_Yoyaku
                    //
                    if (!yoyakuLoad)
                    {
                        this.panel_Yoyaku = new ERP_RORZE_DLL.Business.panel_Yoyaku();
                        yoyakuLoad = true;
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_Yoyaku);
                    this.panel_Yoyaku.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_Yoyaku.Location = new System.Drawing.Point(2, 2);
                    this.panel_Yoyaku.Name = "panel_Yoyaku";
                    this.panel_Yoyaku.Size = new System.Drawing.Size(697, 425);
                    this.panel_Yoyaku.TabIndex = 0;
                    break;
                /*
                case "navIQRealTime":
                    // 
                    // panel_IQTest
                    //
                    if (!testLoad)
                    {
                        this.panel_IQTest = new ERP_RORZE_DLL.Business.panel_IQTest();
                        testLoad = true;
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_IQTest);
                    this.panel_IQTest.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_IQTest.Location = new System.Drawing.Point(2, 2);
                    this.panel_IQTest.Name = "panel_IQTest";
                    this.panel_IQTest.Size = new System.Drawing.Size(697, 425);
                    this.panel_IQTest.TabIndex = 0;
                    break; */
                case "rtpPurchaseOrder":
                    // 
                    // panel_MainReport
                    //
                    if (!mainreportLoad)
                    {
                        this.panel_MainReport = new ERP_RORZE_DLL.Business.panel_MainReport();
                        //this.panel_MainReport.rptLabel.Text = "Purchase Order Status";
                        mainreportLoad = true;
                    }
                    else
                    {
                        this.panel_MainReport.Dispose();
                        this.panel_MainReport = new ERP_RORZE_DLL.Business.panel_MainReport();
                        //this.panel_MainReport.rptLabel.Text = "Purchase Order Status";
                        mainreportLoad = true;
                    }
                    this.panel_MainReport.LoadData(e.Link.Item.Name);
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_MainReport);
                    this.panel_MainReport.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_MainReport.Location = new System.Drawing.Point(2, 2);
                    this.panel_MainReport.Name = "panel_MainReport";
                    this.panel_MainReport.Size = new System.Drawing.Size(697, 425);
                    this.panel_MainReport.TabIndex = 0;
                    break;
                    /*
                case "rptPOCover":
                    // 
                    // panel_MainReport
                    //
                    if (!mainreportLoad)
                    {
                        this.panel_MainReport = new ERP_RORZE_DLL.Business.panel_MainReport();
                        //this.panel_MainReport.rptLabel.Text = "Purchase Order Status";
                        mainreportLoad = true;
                    }
                    else
                    {
                        this.panel_MainReport.Dispose();
                        this.panel_MainReport = new ERP_RORZE_DLL.Business.panel_MainReport();
                        //this.panel_MainReport.rptLabel.Text = "Purchase Order Status";
                        mainreportLoad = true;
                    }
                    this.panel_MainReport.LoadData(e.Link.Item.Name);
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_MainReport);
                    this.panel_MainReport.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_MainReport.Location = new System.Drawing.Point(2, 2);
                    this.panel_MainReport.Name = "panel_MainReport";
                    this.panel_MainReport.Size = new System.Drawing.Size(697, 425);
                    this.panel_MainReport.TabIndex = 0;
                    break; */
                
                case "rptPOCover":
                    // 
                    // panel_ReportPOCover
                    //
                    if (!pocoverreportLoad)
                    {
                        this.panel_ReportPOCover = new ERP_RORZE_DLL.Business.panel_ReportPOCover();                        
                        pocoverreportLoad = true;                        
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_ReportPOCover);
                    this.panel_ReportPOCover.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_ReportPOCover.Location = new System.Drawing.Point(2, 2);
                    this.panel_ReportPOCover.Name = "panel_ReportPOCover";
                    this.panel_ReportPOCover.Size = new System.Drawing.Size(697, 425);
                    this.panel_ReportPOCover.TabIndex = 0;
                    break;

                case "rptMasterPOCover":
                    // 
                    // panel_MainReport
                    //
                    if (!masterporeportLoad)
                    {
                        this.panel_ReportMasterPOCover = new ERP_RORZE_DLL.Business.panel_ReportMasterPOCover();
                        masterporeportLoad = true;
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_ReportMasterPOCover);
                    this.panel_ReportMasterPOCover.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_ReportMasterPOCover.Location = new System.Drawing.Point(2, 2);
                    this.panel_ReportMasterPOCover.Name = "panel_ReportMasterPOCover";
                    this.panel_ReportMasterPOCover.Size = new System.Drawing.Size(697, 425);
                    this.panel_ReportMasterPOCover.TabIndex = 0;
                    break;

                case "rptArrivingGoodsPlan":
                    // 
                    // panel_ImportOrder
                    //
                    if (!arrivinggoodsLoad)
                    {
                        this.panel_ImportOrder = new ERP_RORZE_DLL.Business.panel_ImportOrder();
                        arrivinggoodsLoad = true;
                    }
                    this.panelRight.Controls.Clear();
                    this.panelRight.Controls.Add(this.panel_ImportOrder);
                    this.panel_ImportOrder.Dock = System.Windows.Forms.DockStyle.Fill;
                    this.panel_ImportOrder.Location = new System.Drawing.Point(2, 2);
                    this.panel_ImportOrder.Name = "panel_ImportOrder";
                    this.panel_ImportOrder.Size = new System.Drawing.Size(697, 425);
                    this.panel_ImportOrder.TabIndex = 0;
                    break;

                default:
                    this.panelRight.Controls.Clear();
                    break;
            }
            //throw new System.NotImplementedException();
        } 
    }
    public class ComboboxItem
    {
        public string Text { get; set; }
        public object Value { get; set; }

        public override string ToString()
        {
            return Text;
        }
    }
}
